/*$Id: photos_access.js,v 1.1 2008/09/18 09:10:04 eastcn Exp $*/
Drupal.behaviors.photos_access = function (context) {
	var checkval = $('#photos_access_privacy input[@type=radio][@checked]').val();
	switch (checkval){
		case '2':
			$('#photos_access_viewuser, .photos_access_remove').show(500);
		break;
		case '3':
			$('#photos_access_password').show(500);
			$('#photos_access_password label').text(Drupal.t('Reset Password'));
		break;
	}
	$('#photos_access_privacy input[@type=radio]').change(function() {
		var checkval = $(this).attr("checked", true).val();
		switch (checkval){
			case '2':
				$('#photos_access_viewuser, .photos_access_remove').show(500);
				$('#photos_access_password').hide(500);
			break;
			case '3':
				$('#photos_access_password').show(500);
				$('#photos_access_viewuser, .photos_access_remove').hide(500);
			break;
			default:
				$('#photos_access_password').hide(500);
				$('#photos_access_viewuser, .photos_access_remove').hide(500);
			break;
		}
	});
}